package system_design.home.shiti;

import system_design.home.jiekou.GoodsList;
import system_design.home.jiekou.IOperation;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LENOVO
 * Date: 2022-01-07
 * Time: 8:34
 */
public abstract class User {
    protected   String name;
    protected   IOperation[] iOperation;//操作组合
    public  User(String name){
        this.name = name;
    }
    public abstract int menu();//列表方法  方便后面的动态绑定
    public void doWork(int choice, GoodsList goodsList){//**** 选择及其顺序表
        iOperation[choice].work(goodsList);//前面是对象的选择数组 后面是对象的方法
        //进入顺序表的各个操作
    }
}
